//
// Created by xili on 2024/8/8 10:46.
// Go big or go home.
//
#include <vector>

using namespace std;

class Solution {
public:
    vector<int> findPeaks(vector<int> &mountain) {
        vector<int> ans;
        for (int i = 1; i < mountain.size() - 1; i++) {
            if (mountain[i] > mountain[i - 1] && mountain[i] > mountain[i + 1]) {
                ans.push_back(i++);
            }
        }
        return ans;
    }
};